<?xml version="1.0" encoding="ISO-8859-1"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
  xmlns:ui="http://java.sun.com/jsf/facelets"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:s="http://jboss.com/products/seam/taglib"
  template="/WEB-INF/templates/template.xhtml"
  xmlns:a4j="http://richfaces.org/a4j"
  xmlns:rich="http://richfaces.org/rich">
  
  <ui:define name="head">
    
    </ui:define>
<ui:define name="aperturamp">
   <center >
	<br />
	<br />
   <h:form id="aperturampform">
   <h:dataTable value="#{aperturaMpCtrl.articulosDetail}" var="articulo" styleClass="mainTable" headerClass="heading" columnClasses="even, even" >
	   <h:column>
	   		<f:facet name ="header">
	   			<h:outputText value="Articulo"  style="FONT-WEIGHT: bold;"/>
	   		</f:facet>
	   		<h:outputText value="#{articulo.descripcion}" />	
	   </h:column>
	   	<h:column>
	   	<f:facet name ="header">
	   			<h:outputText value="Consumo de Materias Primas"  style="FONT-WEIGHT: bold;"/>
	   		</f:facet>
	   	<h:panelGrid columns="16"> 
	  	  <h:dataTable value="#{aperturaMpCtrl.listMateriaPrimas(articulo)}" var="materia" styleClass="mainTable" headerClass="heading" 
	  	  		columnClasses="even, even">
	   	 	<h:column>
	   	 		<f:facet name ="header">
	   			<h:outputText value="Materia Prima"  style="FONT-WEIGHT: bold;"/>
	   		</f:facet>
	   				<h:outputText value="#{materia.materiaPrima.nombre}" />
	   		</h:column>
	   		<h:column>
	   		<f:facet name ="header">
	   			<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   		</f:facet>
	   			<h:outputText value="#{materia.costoMp}" >
	   			<f:convertNumber pattern = "#,####0.0000"/>
	   			</h:outputText>
	   		</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoPapel}" />
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Papel"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoPapel}" >
	   					<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoModulo}" />
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Modulo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoModulo}" >
	   				<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoManija}" />
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Manija"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoManija}" >
	   					<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoTinta}" />
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Tinta"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoTinta}" >
	   				<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoAdhesivo}" />
	   			</h:column>	
	   				<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Adhesivo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoAdhesivo}" >
	   				<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoHotMel}" />
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Hotmel"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>	
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoHotMel}" >
	   				<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Consumo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.consumoEngrudo}" />
	   			</h:column>
	   				<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Engrudo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   			</h:column>		
	   			<h:column>
	   				<f:facet name ="header">
	   					<h:outputText value="Costo"  style="FONT-WEIGHT: bold;"/>
	   				</f:facet>
	   				<h:outputText value="#{materia.costoEngrudo}" >
	   				<f:convertNumber pattern = "#,##0.0000"/>
	   				</h:outputText>
	   			</h:column>
	   			<h:column>
	   			  <f:facet name ="header">
	   					<h:outputText value="Scrap"  style="FONT-WEIGHT: bold;"/>
	   			 </f:facet>
	   				<h:outputText value="#{materia.costoMp * 0.10}" >
	   				<f:convertNumber pattern = "#,##0.00"/>
	   				</h:outputText>
	   			</h:column>
	   	 </h:dataTable>
	   	 </h:panelGrid>	 
		</h:column>
	</h:dataTable>
		<br />
		<br />
	
	</h:form>
	</center>
</ui:define>
	 <ui:define name="body">
  
  </ui:define>
 </ui:composition>


